package com.gitee.qdbp.general.system.api.personnel.service;

import com.gitee.qdbp.able.exception.ServiceException;
import com.gitee.qdbp.able.jdbc.ordering.OrderPaging;
import com.gitee.qdbp.able.jdbc.paging.PageList;
import com.gitee.qdbp.general.system.api.personnel.model.DepartmentCoreBean;
import com.gitee.qdbp.general.system.api.personnel.model.DepartmentCoreWhere;

/**
 * 部门信息业务接口
 *
 * @author zhh
 * @version 170214
 */
public interface IDepartmentCoreQueryer {

    /** 部门编号的递增长度 **/
    static int DEPT_CODE_LENGTH = 5;

    DepartmentCoreBean find(String id) throws ServiceException;

    DepartmentCoreBean find(DepartmentCoreWhere where) throws ServiceException;

    PageList<DepartmentCoreBean> list(DepartmentCoreWhere where, OrderPaging paging) throws ServiceException;

    /** parents: 是否需要将所有父节点查出来 **/
    PageList<DepartmentCoreBean> list(DepartmentCoreWhere where, OrderPaging paging, boolean parents)
            throws ServiceException;
}
